import { defineStore } from 'pinia'
import { getTasks, updateTask } from '@/service/task/task'

const useTaskStore = defineStore('task', {
  state: () => ({
    tasks: []
  }),
  actions: {
    async getTasks(limit, offset, date) {
      const res = await getTasks(limit, offset, date)
      return res
    },
    async updateTask(task) {
      const res = await updateTask(task)
      return res
    }
  }
})

export default useTaskStore